<!DOCTYPE html>
<html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vue Template</title>
</head>
<body>
    <template id="comp">
        <div>
            <h1>{{ title }}</h1>
            <p>{{ message }}</p>
        </div>
    </template>
    <div id="app">
        <comp></comp>
    </div>
<script src="../js/vue.js"></script>
<script>

    Vue.component('comp',{
        template: '#comp',
        data(){
            return {
                title: '标题',
                message: '哈哈哈哈哈'
            }
        }
    })

    const app = new Vue({
        el: '#app',
        data: {
            message: 'hello Vue!'
        }
    })
</script>
</body>
</html>